package com.lz.football.module.club.item
{
	import com.common.utils.DisplayObjectUtil;
	import com.common.utils.Reflection;
	
	import flash.display.MovieClip;

	/**
	 *队徽 
	 * @author Administrator
	 * 
	 */	
	public class LogoItem extends BaseItem
	{
		
		public function LogoItem()
		{
			super();
		}
		/**
		 * 设置图片显示资源 
		 * 
		 * @param value  BitmapData 或者已经在swf中的资源（string）
		 * 
		 */
		override public function setImageSorce(value:Object,$width:int = 0,$height:int = 0):void
		{
			DisplayObjectUtil.removeAllChildren(contain);
			var icon:MovieClip = Reflection.createInstance(value as String);
			icon.scaleX = 0.45;
			icon.scaleY = 0.45;
			icon.x = (-icon.width) >> 1;
			icon.y = (-icon.height)>> 1;
			contain.addChild(icon);
		}
		/**
		 *重置 
		 * 
		 */
		override public function reset():void
		{
			DisplayObjectUtil.removeAllChildren(contain);
			select = false;
			data = null;
		}
	}
}